import { Api } from "@/common/api";
import { requestDuration, requestMethod, requestType } from "@/common/request";

// 创建接口对象

// 测试接口
// 仅作为示例，使用完成后请删除
export class TestApi extends Api {
  constructor() {
    super("getdataall");
    this.method(requestMethod.POST);
  }
}

// 登录
export class AuthApi extends Api {
  constructor() {
    super("api/login");
    this.method(requestMethod.POST);
  }
}

export class UserInfoApi extends Api {
  constructor() {
    super("api/v1/me");
    this.method(requestMethod.POST);
  }
}

// 上传文件
export class UploadApi extends Api {
  constructor() {
    super("api/v1/uploat");
    this.method(requestMethod.POST).type(requestType.FILE).timeout(requestDuration.FILE);
  }

  upload() {
    // pass
  }
}
// 上传文件
export class uploadFile extends Api {
  constructor() {
    super("api/v1/uploat");
    this.method(requestMethod.POST).type(requestType.FILE).timeout(requestDuration.FILE);
  }

  upload() {
    // pass
  }
}

export class LogApi extends Api {
  constructor() {
    super("api/v1/czlog-index");
    this.method(requestMethod.GET);
  }
}
//发送短信
export class LoginYzm extends Api {
  constructor() {
    super("api/fsyzm");
    this.method(requestMethod.GET);
  }
}
